package com.arpa.ntocc.common.domain.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.arpa.ntocc.common.common.cache.RoleCacheDO;
import com.arpa.ntocc.common.domain.dto.ShipmentAuthorizationJsonBean;
import com.arpa.ntocc.common.domain.dto.WarehouseAuthorizationJsonBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 登录账号VO
 * </p>
 *
 * @author liuyj
 * @since 2019-11-26
 */
@Data
@ApiModel(value = "UserLoginVO对象", description = "登录账号")
public class UserLoginVO implements Serializable {


    @ApiModelProperty(value = "自增主键")
    private long id;
    @ApiModelProperty(value = "登录账号")
    private String userLoginId;

    @ApiModelProperty(value = "所属机构")
    private String groupCode;

    @ApiModelProperty(value = "用户标识")
    private String partyCode;

    @ApiModelProperty(value = "用户名")
    private String name;
    /**
     * 仓库授权
     * {
     *   "warehouse": "仓库1",
     *   "shipment": [
     *     "货主1",
     *     "货主2",
     *     "货主3"
     *   ]
     * }
     */
    @ApiModelProperty(value = "'仓库授权'")
    private String warehouseAuthorization;

    /**
     * 货主授权
     * {
     *   "shipment": "货主1",
     *   "warehouse": [
     *     "仓库1",
     *     "仓库2",
     *     "仓库3"
     *   ]
     * }
     */
    @ApiModelProperty(value = "'货主授权'")
    private String shipmentAuthorization;

    @ApiModelProperty(value = "登录账号类型：WAREHOUSE（仓库）/SHIPMENT（入驻商）/WAREHOUSE、SHIPMENT（仓库，入驻商）")
    private String userLoginType;
    @ApiModelProperty(value = "'仓库授权'")
    private List<WarehouseAuthorizationJsonBean> warehouseAuthorizations;
    @ApiModelProperty(value = "'货主授权'")
    private List<ShipmentAuthorizationJsonBean> shipmentAuthorizations;
    @ApiModelProperty(value = "角色列表")
    private List<RoleCacheDO> roleList;

    @ApiModelProperty(value = "角色code列表")
    private List<String> roleCodeList;



    @ApiModelProperty(value = "网点编码")
    private String branchCode;
    @ApiModelProperty(value = "部门编码")
    private String departmentCode;
    @ApiModelProperty(value = "网点编码")
    private String branchName;
    @ApiModelProperty(value = "部门编码")
    private String departmentName;

    @ApiModelProperty(value = "总数")
    private Long total;

    @ApiModelProperty(value = "创建人")
    private String createdBy;

    @ApiModelProperty(value = "创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtCreated;

}
